// 我是棋盘中行组件
import React from "react";
import BoardCol from "../components/BoardCol"


export default class BoardRow extends React.Component {
    handleCoclick(row,col){
        this.props.onColClick(row,col);
    }
    render(){
        const {cols} = this.props
        return (
            <div className="BoardRow">
                {
                 cols.map((item,index)=>{
                     return <BoardCol onColClick={this.handleCoclick.bind(this)} value={item} row={this.props.row} col={index} key={index}/>
                 })   
                }
            </div>
        )
    }
}